#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QSystemTrayIcon>
#include <QMenu>
#include "formSocketSrv.h"

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT
    
public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

    void createAction();
    void createTrayIcon();
    
public slots:
    void slotSrvStateChanged(bool state);

protected slots:
    void slotStartSrv();
    void slotShow();
    void slotIconActivated(QSystemTrayIcon::ActivationReason reason);

private:
    Ui::MainWindow *ui;
    QAction *m_startAction;
    QAction *m_showAction;
    QAction *m_quitAction;

    QSystemTrayIcon *m_trayIcon;
    QMenu *m_trayIconMenu;

    FormSocketSrv *m_pSocketSrv;
};

#endif // MAINWINDOW_H
